Skip to content

Worker insights#3087

Draft
Alex-Tideman wants to merge 22 commits intomainfrom
worker-insights
Draft

Worker insights#3087
Alex-Tideman wants to merge 22 commits intomainfrom
worker-insights

Conversation

@Alex-Tideman
Copy link
Collaborator

Description & motivation 💭

Screenshots (if applicable) 📸

Design Considerations 🎨

Testing 🧪

How was this tested 👻

  • Manual testing
  • E2E tests added
  • Unit tests added

Steps for others to test: 🚶🏽‍♂️🚶🏽‍♀️

Checklists

Draft Checklist

Merge Checklist

Issue(s) closed

Docs

Any docs updates needed?

@vercel
Copy link

vercel bot commented Jan 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview, Comment Mar 6, 2026 0:40am

Request Review

@temporal-cicd
Copy link
Contributor

temporal-cicd bot commented Jan 12, 2026

Warnings
⚠️

📊 Strict Mode: 103 errors in 22 files (8.9% of 1153 total)

src/lib/utilities/route-for.ts (1)
  • L285:4: Type 'string | undefined' is not assignable to type 'string'.
src/lib/utilities/route-for-api.ts (8)
  • L68:48: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.
  • L74:50: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.
  • L76:4: Type 'string | null' is not assignable to type 'string'.
  • L103:8: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ namespace: string; workflowId: string; scheduleId: string; queue: string; queryType: string; signalName: string; updateName: string; batchJobId: string; runId: string; activityId: string; endpointId: string; deploymentName: string; version: string; workerInstanceKey: string; }'.
  • L103:38: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Partial'.
  • L105:8: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ namespace: string; workflowId: string; scheduleId: string; queue: string; queryType: string; signalName: string; updateName: string; batchJobId: string; runId: string; activityId: string; endpointId: string; deploymentName: string; version: string; workerInstanceKey: string; }'.
  • L105:57: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Partial'.
  • L191:16: This overload signature is not compatible with its implementation signature.
src/lib/stores/filters.ts (2)
  • L114:2: Argument of type 'StartStopNotifier<EventTypeCategory[] | null>' is not assignable to parameter of type 'StartStopNotifier<EventTypeCategory[] | undefined>'.
  • L130:13: Argument of type 'StartStopNotifier<("Scheduled" | "Unspecified" | "Open" | "New" | "Started" | "Initiated" | "Running" | "Completed" | "Fired" | "Signaled" | "Canceled" | "Failed" | "Terminated" | "TimedOut" | "CancelRequested")[] | null>' is not assignable to parameter of type 'StartStopNotifier<("Scheduled" | "Unspecified" | "Open" | "New" | "Started" | "Initiated" | "Running" | "Completed" | "Fired" | "Signaled" | "Canceled" | "Failed" | "Terminated" | "TimedOut" | "CancelRequested")[] | undefined>'.
src/lib/utilities/screaming-enums.ts (3)
  • L85:14: Type 'undefined' is not assignable to type 'PendingActivityState'.
  • L92:14: Type 'PendingNexusOperationState.PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED | undefined' is not assignable to type 'PendingNexusOperationState'.
  • L99:14: Type 'CallbackState.CALLBACK_STATE_UNSPECIFIED | undefined' is not assignable to type 'CallbackState'.
src/lib/services/worker-service.ts (1)
  • L26:8: Type 'string | null | undefined' is not assignable to type 'string'.
src/lib/components/worker-table.svelte (6)
  • L69:12: Type 'number | null | undefined' is not assignable to type 'string | number'.
  • L69:24: 'workers.versioningInfo' is possibly 'null' or 'undefined'.
  • L75:5: Parameter 'poller' implicitly has an 'any' type.
  • L158:35: 'poller.taskQueueTypes' is possibly 'undefined'.
  • L165:35: 'poller.taskQueueTypes' is possibly 'undefined'.
  • L172:35: 'poller.taskQueueTypes' is possibly 'undefined'.
src/lib/components/lines-and-dots/workflow-details.svelte (9)
  • L83:41: 'e.billableActions' is possibly 'undefined'.
  • L165:6: Type 'string | undefined' is not assignable to type 'string'.
  • L174:6: Type 'string | undefined' is not assignable to type 'string'.
  • L177:8: Type 'string | undefined' is not assignable to type 'string'.
  • L215:10: Type 'string | undefined' is not assignable to type 'string'.
  • L233:10: Type 'string | undefined' is not assignable to type 'string'.
  • L258:8: Type 'string | null | undefined' is not assignable to type 'string'.
  • L261:10: Type 'string | null | undefined' is not assignable to type 'string'.
  • L262:10: Type 'string | null | undefined' is not assignable to type 'string'.
src/lib/components/workers/worker-status.svelte (2)
  • L14:22: Type 'string | null' does not satisfy the constraint 'string | number | symbol'.
  • L40:11: Type 'null' cannot be used as an index type.
src/lib/components/shared-search-attribute-filter/status-filter-chip.svelte (3)
  • L142:44: Argument of type 'string | null' is not assignable to parameter of type 'string'.
  • L148:14: Type '"All" | "Unspecified" | "Running" | "Completed" | "Canceled" | "Failed" | "Terminated" | "Paused" | "TimedOut" | "ContinuedAsNew" | "ShuttingDown" | null' is not assignable to type 'string | undefined'.
  • L146:50: Argument of type 'string | null' is not assignable to parameter of type 'string'.
src/lib/components/shared-search-attribute-filter/filter-list.svelte (3)
  • L89:23: '$activeQueryIndex' is possibly 'null'.
  • L90:6: '$activeQueryIndex' is possibly 'null'.
  • L117:10: Type 'number | null' is not assignable to type 'number | undefined'.
src/lib/components/shared-search-attribute-filter/search-attribute-menu.svelte (1)
  • L140:8: Type 'boolean | "" | undefined' is not assignable to type 'boolean | undefined'.
src/lib/components/task-queue/worker-info.svelte (15)
  • L177:45: 'slots.currentUsedSlots' is possibly 'null' or 'undefined'.
  • L252:15: 'heartbeat.hostInfo.currentHostCpuUsage' is possibly 'null' or 'undefined'.
  • L258:12: Argument of type 'number | null | undefined' is not assignable to parameter of type 'number'.
  • L270:15: 'heartbeat.hostInfo.currentHostMemUsage' is possibly 'null' or 'undefined'.
  • L276:12: Argument of type 'number | null | undefined' is not assignable to parameter of type 'number'.
  • L37:49: Argument of type 'WorkerStatus | null | undefined' is not assignable to parameter of type 'WorkerStatus | undefined'.
  • L71:8: Type 'string | null | undefined' is not assignable to type 'string'.
  • L105:8: Type 'string | null | undefined' is not assignable to type 'string'.
  • L108:10: Type 'string | null | undefined' is not assignable to type 'string'.
  • L116:29: Argument of type 'string | null | undefined' is not assignable to parameter of type 'string | undefined'.
  • L117:10: Type 'string | null | undefined' is not assignable to type 'string'.
  • L127:8: Argument of type 'IWorkerSlotsInfo | null | undefined' is not assignable to parameter of type 'IWorkerSlotsInfo'.
  • L132:8: Argument of type 'IWorkerSlotsInfo | null | undefined' is not assignable to parameter of type 'IWorkerSlotsInfo'.
  • L137:8: Argument of type 'IWorkerSlotsInfo | null | undefined' is not assignable to parameter of type 'IWorkerSlotsInfo'.
  • L142:8: Argument of type 'IWorkerSlotsInfo | null | undefined' is not assignable to parameter of type 'IWorkerSlotsInfo'.
src/lib/components/workers/workers-table/workers-table-cell.svelte (2)
  • L36:26: Type 'string | undefined' is not assignable to type 'string'.
  • L85:4: Type 'string | undefined' is not assignable to type 'string'.
src/lib/components/workers/workers-table/workers-table-row.svelte (17)
  • L18:27: 'worker.workerHeartbeat' is possibly 'null' or 'undefined'.
  • L18:27: Argument of type 'WorkerStatus | null | undefined' is not assignable to parameter of type 'WorkerStatus | undefined'.
  • L28:4: Type 'string | null | undefined' is not assignable to type 'string | undefined'.
  • L28:11: 'worker.workerHeartbeat' is possibly 'null' or 'undefined'.
  • L31:6: Type 'string | null | undefined' is not assignable to type 'string'.
  • L31:25: 'worker.workerHeartbeat' is possibly 'null' or 'undefined'.
  • L37:4: Type 'string | null | undefined' is not assignable to type 'string | undefined'.
  • L37:11: 'worker.workerHeartbeat' is possibly 'null' or 'undefined'.
  • L42:4: Type 'string | null | undefined' is not assignable to type 'string | undefined'.
  • L42:11: 'worker.workerHeartbeat' is possibly 'null' or 'undefined'.
  • L47:4: Type 'string | null | undefined' is not assignable to type 'string | undefined'.
  • L47:11: 'worker.workerHeartbeat' is possibly 'null' or 'undefined'.
  • L47:11: 'worker.workerHeartbeat.hostInfo' is possibly 'null' or 'undefined'.
  • L52:25: 'worker.workerHeartbeat' is possibly 'null' or 'undefined'.
  • L52:25: Argument of type 'string | null | undefined' is not assignable to parameter of type 'string | undefined'.
  • L53:6: Type 'string | null | undefined' is not assignable to type 'string'.
  • L53:15: 'worker.workerHeartbeat' is possibly 'null' or 'undefined'.
src/lib/components/workers/workers-table/workers-table.svelte (2)
  • L33:3: Type '((err: APIErrorResponse) => void) | undefined' is not assignable to type '((error: unknown) => void | undefined) | undefined'.
  • L50:33: 'worker.workerHeartbeat' is possibly 'null' or 'undefined'.
src/lib/components/task-queue/worker-totals.svelte (1)
  • L14:33: Argument of type 'WorkerStatus | null | undefined' is not assignable to parameter of type 'WorkerStatus | undefined'.
src/lib/components/workflow/workflow-summary.svelte (7)
  • L42:10: Type 'string | undefined' is not assignable to type 'string'.
  • L48:10: Type 'string | undefined' is not assignable to type 'string'.
  • L54:10: Type 'string | undefined' is not assignable to type 'string'.
  • L63:10: Type 'string | undefined' is not assignable to type 'string'.
  • L66:12: Type 'string | undefined' is not assignable to type 'string'.
  • L67:12: Type 'string | undefined' is not assignable to type 'string'.
  • L74:10: Type 'string | undefined' is not assignable to type 'string'.
src/lib/layouts/workflow-header.svelte (9)
  • L135:37: Argument of type 'WorkflowExecution | null' is not assignable to parameter of type 'WorkflowExecution'.
  • L136:45: Argument of type 'WorkflowExecution | null' is not assignable to parameter of type 'WorkflowExecution'.
  • L141:13: Type 'WorkflowExecution | null' is not assignable to type 'WorkflowExecution'.
  • L167:9: Type 'WorkflowExecution | null' is not assignable to type 'WorkflowExecution'.
  • L175:20: Type 'WorkflowExecution | null' is not assignable to type 'WorkflowExecution'.
  • L231:12: Type 'string | undefined' is not assignable to type 'string'.
  • L266:11: 'workflow' is possibly 'null'.
  • L308:12: 'workflow' is possibly 'null'.
  • L308:12: 'workflow.searchAttributes' is possibly 'undefined'.
src/lib/layouts/workflow-run-layout.svelte (8)
  • L102:39: Type 'string | undefined' is not assignable to type 'string'.
  • L118:8: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
  • L153:6: Type 'WorkflowExecution | undefined' is not assignable to type 'WorkflowExecution | null'.
  • L167:4: Type 'undefined' is not assignable to type 'NetworkError | null'.
  • L170:18: No overload matches this call.
  • L179:28: Parameter 'fullHistory' implicitly has an 'any' type.
  • L179:41: Parameter 'pause' implicitly has an 'any' type.
  • L211:35: Argument of type 'null' is not assignable to parameter of type '((key: string, value: { eventHistory: WorkflowEvents; workflow: WorkflowExecution | null; workers: IDescribeTaskQueueResponse; workersLoaded: boolean; metadata: WorkflowMetadata | null; userMetadata: { ...; }; }) => { ...; }) | undefined'.
src/lib/pages/deployments.svelte (1)
  • L44:5: Type '(err: APIErrorResponse) => void' is not assignable to type '(error: unknown) => void | undefined'.
src/routes/(app)/+layout.svelte (1)
  • L62:23: Argument of type '(namespace: string) => { namespace: string; onClick: (namespace: string) => void; }' is not assignable to parameter of type '(value: string | null | undefined, index: number, array: (string | null | undefined)[]) => { namespace: string; onClick: (namespace: string) => void; }'.
src/routes/(app)/namespaces/[namespace]/workers/[workerInstanceKey]/+page.svelte (1)
  • L34:14: Type 'IWorkerInfo | null | undefined' is not assignable to type 'IWorkerInfo'.

Generated by 🚫 dangerJS against ae15acc

@@ -62,7 +62,7 @@
<div class="h-0.5 rounded-full bg-inverse"></div>
<WorkflowDetail
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | undefined' is not assignable to type 'string'.

content={workflow?.taskQueue}
href={routeForWorkers({
href={routeForWorkflowWorkers({
namespace: $page.params.namespace,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | undefined' is not assignable to type 'string'.

href={routeForWorkers({
href={routeForWorkflowWorkers({
namespace: $page.params.namespace,
workflow: workflow?.id,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | undefined' is not assignable to type 'string'.

<DropdownFilterChip
filter={activityFilter}
filter={filterItem}
index={i}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'number | null' is not assignable to type 'number | undefined'.

@@ -131,8 +138,9 @@
onclick={() => {
handleNewQuery(value, type);
}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'boolean | "" | undefined' is not assignable to type 'boolean | undefined'.

!localFilters[0].value &&
status === 'All')}
<MenuItem
data-testid={`status-dropdown-filter-chip-${status}`}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Argument of type 'string | null' is not assignable to parameter of type 'string'.

onclick={() => handleStatusSelect(status)}
>
{#snippet leading()}
<Checkbox
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Argument of type 'string | null' is not assignable to parameter of type 'string'.

{#snippet leading()}
<Checkbox
on:change={() => handleStatusSelect(status)}
{checked}
Copy link
Contributor

@temporal-cicd temporal-cicd bot Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type '"All" | "Unspecified" | "Running" | "Completed" | "Canceled" | "Failed" | "Terminated" | "Paused" | "TimedOut" | "ContinuedAsNew" | "ShuttingDown" | null' is not assignable to type 'string | undefined'.

/>
<WorkersTableCell copyable={false}>
<SdkLogo
sdk={formatSDKName(worker.workerHeartbeat.sdkName)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ 'worker.workerHeartbeat' is possibly 'null' or 'undefined'.
  • ⚠️ Type 'string | null | undefined' is not assignable to type 'string'.


<PaginatedTable
let:visibleItems
{onFetch}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type '((err: APIErrorResponse) => void) | undefined' is not assignable to type '((error: unknown) => void | undefined) | undefined'.

{#each columns as { label } (label)}
<th>{label}</th>
{/each}
</tr>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ 'worker.workerHeartbeat' is possibly 'null' or 'undefined'.

request,
params: {
maximumPageSize: String(pageSize),
nextPageToken: token,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | null | undefined' is not assignable to type 'string'.

</div>
</div>
</header>
{#await describeWorker({ namespace, workerInstanceKey }) then data}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'IWorkerInfo | null | undefined' is not assignable to type 'IWorkerInfo'.

@@ -175,7 +174,6 @@
</div>
<CodecServerErrorBanner />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'WorkflowExecution | null' is not assignable to type 'WorkflowExecution'.

let { worker }: Props = $props();

const { namespace } = $derived(page.params);
const heartbeat = $derived(worker.workerHeartbeat);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Argument of type 'WorkerStatus | null | undefined' is not assignable to parameter of type 'WorkerStatus | undefined'.

>
<Copyable
copyIconTitle={translate('common.copy-icon-title')}
copySuccessIconTitle={translate('common.copy-success-icon-title')}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | null | undefined' is not assignable to type 'string'.

<DetailListColumn>
<DetailListLabel>{translate('common.task-queue')}</DetailListLabel>
<DetailListLinkValue
copyable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | null | undefined' is not assignable to type 'string'.

<DetailListColumn>
<DetailListLabel>{translate('workers.sdk')}</DetailListLabel>
<DetailListValue>
<SdkLogo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Argument of type 'string | null | undefined' is not assignable to parameter of type 'string | undefined'.

<DetailListLabel>{translate('workers.sdk')}</DetailListLabel>
<DetailListValue>
<SdkLogo
sdk={formatSDKName(heartbeat?.sdkName)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | null | undefined' is not assignable to type 'string'.

{slots.currentUsedSlots ?? 0}
</p>
<p class="font-mono text-2xl font-semibold">
{#if slots.currentAvailableSlots}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ 'slots.currentUsedSlots' is possibly 'null' or 'undefined'.

<span class="flex items-center gap-1 font-semibold">
<Icon name="microchip" class="h-3 w-3 text-secondary" />
{translate('workers.cpu-usage')}
</span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ 'heartbeat.hostInfo.currentHostCpuUsage' is possibly 'null' or 'undefined'.

<div class="relative h-2 w-full overflow-hidden rounded bg-indigo-100">
<div
class="absolute left-0 flex h-full items-center bg-indigo-600"
style="width:{Math.min(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Argument of type 'number | null | undefined' is not assignable to parameter of type 'number'.

<span class="flex items-center gap-1 font-semibold">
<Icon name="server" class="h-3 w-3 text-secondary" />
{translate('workers.memory-usage')}
</span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ 'heartbeat.hostInfo.currentHostMemUsage' is possibly 'null' or 'undefined'.

<div class="relative h-2 w-full overflow-hidden rounded bg-indigo-100">
<div
class="absolute left-0 flex h-full items-center bg-indigo-600"
style="width:{Math.min(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Argument of type 'number | null | undefined' is not assignable to parameter of type 'number'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants